/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author jose
 */
import java.io.BufferedReader; 
import java.io.File; 
import java.io.FileReader; 
import java.io.IOException; 
public class ArregloNumeros {
 
    
 public Integer []numerosGenerados (int cantidadNum){    
    File f = new File( "numeros.txt" ); 
    BufferedReader entrada; 
    Integer[] aregloNum= new Integer[cantidadNum];

    try { 
        entrada = new BufferedReader( new FileReader( f ) ); 
        String linea; 
        for (int n=0; n< aregloNum.length;n++) { 
            
            linea = entrada.readLine();
            System.out.println(linea);
            int y= Integer.parseInt(linea);
            aregloNum[n]=y;
            
        }
        
        }   
    catch (IOException e) { 
        }
    return aregloNum;
 }
  
} 